<?php

class Validate {
	public static function required($param, $value) {
		return $value != '';
	}
	public static function minlength($param, $value) {
		return strlen($value) >= $param;
	}
	public static function maxlength($param, $value) {
		return strlen($value) <= $param;
	}
	public static function minvalue($param, $value) {
		return $value >= $param;
	}
	public static function maxvalue($param, $value) {
		return $value <= $param;
	}
	public static function regexp($param, $value) {
		return preg_match($param, $value);
	}
}

?>
